﻿--[[
   @brief    client global tips show frame
   @author   jadonsun
   @version  1.0
   @date     2017-04-18
--]]
client_tips_frame_desc =
{
    module_name = "client_tips_frame",
    events = 
    {
        {
            c_event = 
            {
                {
                    id = ierd_tgp.login_mgr.LOGIN_ON_LOGIN_SUCCESS,
                    callback = "client_tips_frame_control.on_login_success"
                },
                {
                    id = ierd_tgp.tips_mgr.ON_MSGTIPS_GAME_RUNNING,
                    callback = "client_tips_frame_model.get_game_runing_state"
                },
                {
                    id = ierd_tgp.game_mgr.GAME_MGR_GAME_END,
                    callback = "client_tips_frame_model.get_game_end_state"
                },
                {
                    id = ierd_tgp.game_mgr.GAME_MGR_PROCESS_DELETED,
                    callback = "client_tips_frame_model.get_game_end_state"
                },

                -- 以下为tips弹框监听事件

                -- 游戏更新完成后的气泡tips
                {
                    id  = ierd_tgp.game_library.K_UPDATE_RESULT,
                    callback = "gameupdate_tips_control.on_game_update_result"
                },
                -- 游戏预更新开始的气泡tips
                {
                    id = ierd_tgp.game_library.K_PREUPDATE_BEGIN,
                    callback = "gameupdate_tips_control.on_game_preupdate_begin"
                },
                -- 游戏预更新成功的气泡tips
                {
                    id  = ierd_tgp.game_library.K_PREUPDATE_RESULT,
                    callback = "gameupdate_tips_control.on_game_preupdate_result"
                },
                -- 服务器下发tips
                {
                    id = ierd_tgp.tips_mgr.ON_SHOW_POP_TIPS,
                    callback = "server_tip_control.show_server_tips"
                },

                -- 监听gamelibrary下发的MSG_NOTIFY消息,处理止步相关tips
                {
                    id = ierd_tgp.game_library.MSG_NOTIFY,
                    callback = "gamelibrary_message_notify_control.on_msg_notify"
                },

            },
            lua_event = 
            {
            },
            lua_file = "client_tips_frame\\control.lua"
        },
        {
            listen_broadcast = 
            {
                {
                    id = "i_broadcast_tips_show_com",
                    callback = "client_tips_frame_control.receive_tips"
                },

                -- 游戏自动更新开始tips
                {
                    id = "Msg_AutoUpdate_Begin_Tips",
                    callback = "gameupdate_tips_control.on_autoupdate_begin"
                },
                -- 游戏安装完成tips
                {
                    id = "Msg_Finish_Install_Tips",
                    callback = "gameupdate_tips_control.on_install_finish"
                },
                -- 监听多分支切换完成时，发送的消息
                {
                    id = "i_broadcast_change_branch_update",
                    callback = "gameupdate_tips_control.on_game_switch_branch"
                }
            },
            reg_service =
            {
                {
                    --
                    -- data = { win_id = x  }
                    id = 'svr_tips_clicked',
                    callback = "client_tips_frame_control.on_svr_tips_clicked"
                },
            },
            lua_file = "client_tips_frame\\control.lua"
        }
        
    },
}
desc_mgr.add(client_tips_frame_desc)
ierd_tgp.tpf_ui.Require("client_tips_frame\\tips_receive.lua");